package cae.gui.util;

import java.awt.Image;
import java.awt.Toolkit;

import javax.swing.JDialog;
import javax.swing.JFrame;

import cae.logic.util.CaeClipConfiguration;

public abstract class CaeJDialog extends JDialog {

	CaeJDialog()
	{
		super();
		setIcon();
	}

	public CaeJDialog(JFrame frame, String string, boolean modal) 
	{
		super(frame, string, modal);
		setIcon();
	}
	
	private void setIcon()
	{
		String iconPath = CaeClipConfiguration.getInstance().getSProp(CaeClipConfiguration.ICON_FILE);
		Image img = Toolkit.getDefaultToolkit().getImage(iconPath);
		setIconImage(img);
	}
}
